﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace ASKM.Rachao.Model.Helper
{
    /// <summary>
    /// Helper for configuration properties
    /// </summary>
    public static class ConfigHelper
    {
        /// <summary>
        /// Get valid days for approval ticket
        /// </summary>
        /// <returns>
        /// Qtd days for approval ticket
        /// </returns>
        public static int GetValidDaysForApprovalTicket()
        {
            var value = ConfigurationManager.AppSettings["APPROVAL_TICKET_VALID_DAYS"];
            int ret = 0;
            Int32.TryParse(value, out ret);
            return ret;
        }


        /// <summary>
        /// Get base url
        /// </summary>
        /// <returns>Base url</returns>
        public static String GetBaseUrl()
        {
            var value = ConfigurationManager.AppSettings["BASE_URL"];
            return value;
        }

    }
}
